package com.gnerv.rabbitmq.agent.service;

import com.gnerv.rabbitmq.agent.cache.NodeCache;
import com.gnerv.rabbitmq.agent.model.dto.NodeStatusDTO;
import com.gnerv.rabbitmq.agent.model.entity.NodeStatus;

/**
 * @author Gnerv LiGen
 */
public class NodeService {

    public NodeStatusDTO selectNodeStatus(String name){
        NodeStatusDTO nodeStatusDTO = new NodeStatusDTO();
        nodeStatusDTO.setName(name);
        NodeStatus nodeStatus = NodeCache.STATUS.getIfPresent(name);
        nodeStatusDTO.getMemory().setUsed(nodeStatus.getMemory().getUsed());

        return null;
    }


}
